<%@ tag language="java" body-content="empty" %>
<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security" uri="http://www.springframework.org/security/tags"%>

<%@attribute name ="readonly" required="false" %>
<%@attribute name ="path" required="true" %>
<%@attribute name ="code" required="true" %>

<jstl:if test="${readonly == null}">
	<jstl:set var="readonly" value="false"/>
</jstl:if>

<div>
	<form:label path="${path}">
		<spring:message code="${code}" />
	</form:label>
	<form:input path="${path}" readonly="${readonly}" />
	<form:errors path="${path}" cssClass="error" />
</div>